Lecture

What is the difference between a compiled and an interpreted language?

이 질문은 프로그래밍 언어의 실행 방식에 대한 기본 개념을 이해하고 있는지를 평가하는 질문입니다.

단순 정의 암기보다, 실행 과정의 차이와 대표 언어 예시를 들어 명확하고 논리적으로 설명하는 것이 중요합니다.


Answer 1: Conceptual comparison with examples

English

A compiled language is translated into machine code all at once by a compiler before execution. This results in a standalone binary that can run without the source code. Examples include C, C++, and Go.

An interpreted language, on the other hand, is executed line by line by an interpreter at runtime. This makes it easier to test and debug, but often slower in performance. Common examples are Python, JavaScript, and Ruby.

In short, the key difference is that compiled languages are transformed into machine code ahead of time, while interpreted languages are executed at runtime.

한국어 번역

컴파일 언어는 실행 전에 전체 소스 코드를 한 번에 기계어로 변환합니다. 이 과정에서 생성된 바이너리는 소스 코드 없이도 실행할 수 있습니다. 대표적인 예로는 C, C++, Go 등이 있습니다.

반면, 인터프리터 언어는 실행 시점에 한 줄씩 코드를 읽고 실행합니다. 이 방식은 테스트나 디버깅이 쉬운 반면, 일반적으로 성능은 느릴 수 있습니다. 대표적인 언어로는 Python, JavaScript, Ruby 등이 있습니다.

요약하자면, 컴파일 언어사전 컴파일된 후 실행되며, 인터프리터 언어는 실행 시점에 실행된다는 점이 핵심 차이입니다.

주요 표현 정리

  • compiled language: 컴파일 언어
  • interpreted language: 인터프리터 언어
  • machine code: 기계어
  • ahead-of-time compilation: 사전 컴파일
  • executed at runtime: 실행 시점에 실행됨

Answer 2: Practical impact and trade-offs

English

The main difference lies in how the code is processed. In a compiled language, the source code is converted into machine-level instructions before execution, which usually leads to better performance. This also means the program can be distributed without exposing the original code.

In an interpreted language, the source code is read and executed line by line by an interpreter. This allows for faster development and platform independence, but it can be slower and sometimes harder to achieve performance optimization.

Each approach has trade-offs: compiled languages offer speed and efficiency, while interpreted languages are more flexible and beginner-friendly.

한국어 번역

두 방식의 주요 차이는 코드가 실행되기 전에 어떻게 처리되는지에 있습니다. 컴파일 언어는 실행 전에 기계 수준 명령어로 변환되기 때문에 일반적으로 성능이 뛰어납니다. 또한 컴파일된 파일만 배포하면 되므로, 코드 배포 시 원본 소스 노출을 막을 수 있습니다.

인터프리터 언어는 실행 시점에 코드를 한 줄씩 읽고 실행하기 때문에, 플랫폼 독립성이 높고 개발 속도가 빠릅니다. 하지만 경우에 따라 성능 최적화가 어려울 수 있습니다.

결국, 컴파일 언어속도와 효율성, 인터프리터 언어유연성과 접근성이라는 트레이드오프가 존재합니다.

주요 표현 정리

  • machine-level instructions: 기계 수준 명령어
  • platform independence: 플랫폼 독립성
  • code distribution: 코드 배포
  • performance optimization: 성능 최적화
  • trade-off: 트레이드오프

Lecture

AI Tutor

Design

Upload

Notes

Favorites

Help

What is the difference between a compiled and an interpreted language?